///**
// * Created by Administrator on 2016/6/22.
// */
module.exports = function(app) {
//加载模版
        var template = require('art-template');
//把模版的配置写一下
        app.engine('.html', template.__express);
        app.set('view engine', 'html');
//模版的过滤器放在这里
        template.helper('ms', function(time){
            var time = new Date(time);
            return time.getTime();
        })
        template.helper('formatTime', function(time){
            var time = new Date(time);
            var year = time.getFullYear();
            var month = time.getMonth() + 1;
            var day = time.getDate();
            var month = month < 10 ? '0' + month : month;
            var day = day < 10 ? '0' + day : day;
            return `${year}-${month}-${day}`;
        })
}